#!/bin/bash
PORT=8080
TIMEOUT=5

# 检查健康端点
result=$(curl -s -w "%{http_code}" -o /dev/null --connect-timeout $TIMEOUT http://localhost:$PORT/actuator/health)

if [ "$result" -eq 200 ]; then
  exit 0
else
  echo "健康检查失败，HTTP状态码: $result"
  exit 1
fi